Kanzi 3.9.10
Input and Focus

Input and focus handling More...

Collaboration diagram for Input and Focus:

Classes

class  kanzi::AutoClosingModalScope
 Implements the auto-closing modal scopes. More...
 
class  kanzi::AutoClosingModelessScope
 Implements the auto-closing modeless focus scope. More...
 
class  kanzi::ClickConcept
 Use the ClickConcept properties to control how nodes handle click and double-click. More...
 
class  kanzi::ClickConceptImpl< TBaseClass, TDerivedClass >
 Implementation of base Click Concept class for derived classes. More...
 
class  kanzi::ClickManipulator
 Click input manipulator recognizes the click and tap gestures from the incoming touch events. More...
 
class  kanzi::ClickManipulatorComponent
 ClickManipulatorComponent installs a ClickManipulator to a node. More...
 
class  kanzi::DragAndDropManipulator
 Drag-and-drop input manipulator recognizes the drag-and-drop gesture from incoming touch events. More...
 
class  kanzi::EventFilter
 EventFilter class. More...
 
class  kanzi::EventQueue
 The EventQueue class implements a queue of Kanzi input events gathered by EventSource instances. More...
 
class  kanzi::EventSource
 EventSource class. More...
 
class  kanzi::EventSourceDecorator
 The EventSourceDecorator declares the interface for the EventSource decorators. More...
 
struct  kanzi::EventSourceProperties
 Configurable event source properties. More...
 
struct  kanzi::FocusChainIndex
 Contains the focus order and focus order offset information of a node in a focus scope. More...
 
struct  kanzi::FocusChainNode
 The focus chain node of a focus scope consists of the node of the focus scope, its focus order, and the focus order offset. More...
 
class  kanzi::FocusFence
 Implements the focus fences. More...
 
class  kanzi::FocusGroup
 Implements the focus groups. More...
 
class  kanzi::FocusManager
 Focus Manager enables you to set and change the key focus between attached nodes. More...
 
struct  kanzi::FocusNavigationGesture
 Declares a focus navigation gesture. More...
 
class  kanzi::FocusNavigationManipulator
 FocusNavigationManipulator converts key gestures into focus chain navigation actions to move the focus between focusable nodes. More...
 
class  kanzi::FocusScope
 The FocusScope class holds the attributes of a focus scope: More...
 
class  kanzi::FocusScopeVisitor
 Focus scope visitor for UI scene traversal of focus scopes. More...
 
class  kanzi::InputManager
 Input Manager converts the events from the given event queue into input specific messages. More...
 
class  kanzi::InputManipulator
 The base class for the Kanzi input manipulators. More...
 
class  kanzi::KeyManipulator
 KeyManipulator class is a key input manipulator that detects key gestures. More...
 
class  kanzi::KeyManipulatorComponent
 The KeyManipulatorComponent node component installs a KeyManipulator to the attached node, and configures the key gesture of the manipulator. More...
 
struct  kanzi::KeyMap
 Defines the keys to map from a {LogicalKey, KeyModifier} pair to a simple LogicalKey. More...
 
class  kanzi::KeyMapEventFilter
 The KeyMapEventFilter provides key translation in Kanzi. More...
 
class  kanzi::KeyRepeatGenerator
 The KeyRepeatGenerator is an event source decorator that scans the event queue of the EventSource it extends for key-press events and generates from them key-press repetitions. More...
 
class  kanzi::LongPressManipulator
 Long-press input manipulator recognizes the long-press gesture from the incoming touch events. More...
 
class  kanzi::LongPressManipulatorComponent
 LongPressManipulatorComponent installs a LongPressManipulator to a node. More...
 
class  kanzi::ModalScope
 Implements the modal scopes. More...
 
class  kanzi::ModelessScope
 Implements the modeless overlay focus scopes. More...
 
class  kanzi::MultiClickManipulator
 Multi-click input manipulator recognizes multi-click and multi-tap gestures from incoming touch events. More...
 
class  kanzi::MultiClickManipulatorComponent
 MultiClickManipulatorComponent installs a MultiClickManipulator to a node. More...
 
class  kanzi::NavigationManipulator
 The NavigationManipulator supports these navigation directions and default keyboard keys for them: More...
 
class  kanzi::NavigationManipulatorComponent
 The NavigationManipulatorComponent node component installs a NavigationManipulator to a node, and configures the navigation key gestures of the manipulator. More...
 
class  kanzi::OverlayScope
 Implements the base of overlay focus scopes. More...
 
class  kanzi::PanManipulator
 Pan input manipulator recognizes a pan gesture from the incoming touch events. More...
 
class  kanzi::PanManipulatorComponent
 PanManipulatorComponent installs a PanManipulator to a node. More...
 
class  kanzi::PinchManipulator
 Pinch input manipulator recognizes the pinch gesture from the incoming touch events. More...
 
class  kanzi::TextInputManipulator
 The text input manipulator handles key gestures used with TextBox nodes to move the cursor, select text, and delete text, and provides the basics of text editing capabilities in Kanzi. More...
 
class  kanzi::VisitorFunction
 Wraps a focus scope visitor function into a FocusScopeVisitor. More...
 

Typedefs

using kanzi::PopupScope
 Implements the popup scopes.
 

Enumerations

enum  kanzi::InputTranslation {
  kanzi::TranslateNone , kanzi::TranslatePointerToTouch , kanzi::TranslateTouchToPointer , kanzi::TranslatePointerToTouchPreserve ,
  kanzi::TranslateTouchToPointerPreserve
}
 Enumeration to select translation of events. More...
 
enum class  kanzi::KeyModifier : size_t {
  kanzi::KeyModifier::Undefined , kanzi::KeyModifier::CapsLock , kanzi::KeyModifier::LeftShift , kanzi::KeyModifier::RightShift ,
  kanzi::KeyModifier::LeftControl , kanzi::KeyModifier::RightControl , kanzi::KeyModifier::LeftAlt , kanzi::KeyModifier::RightAlt ,
  kanzi::KeyModifier::LeftSuper , kanzi::KeyModifier::RightSuper , kanzi::KeyModifier::Shift , kanzi::KeyModifier::Control ,
  kanzi::KeyModifier::Alt , kanzi::KeyModifier::Super
}
 Key modifier flags. You can set more than one modifier at a time for a KeyEvent. More...
 
enum class  kanzi::KeyState { kanzi::KeyState::Pressed , kanzi::KeyState::Released }
 Indicates the states of a hardware key. More...
 
enum class  kanzi::LogicalKey {
  kanzi::LogicalKey::Unknown , kanzi::LogicalKey::Number0 , kanzi::LogicalKey::Number1 , kanzi::LogicalKey::Number2 ,
  kanzi::LogicalKey::Number3 , kanzi::LogicalKey::Number4 , kanzi::LogicalKey::Number5 , kanzi::LogicalKey::Number6 ,
  kanzi::LogicalKey::Number7 , kanzi::LogicalKey::Number8 , kanzi::LogicalKey::Number9 , kanzi::LogicalKey::Comma ,
  kanzi::LogicalKey::Period , kanzi::LogicalKey::Semicolon , kanzi::LogicalKey::Pipe , kanzi::LogicalKey::Quote ,
  kanzi::LogicalKey::DecimalSeparator , kanzi::LogicalKey::ThousandsSeparator , kanzi::LogicalKey::A , kanzi::LogicalKey::B ,
  kanzi::LogicalKey::C , kanzi::LogicalKey::D , kanzi::LogicalKey::E , kanzi::LogicalKey::F ,
  kanzi::LogicalKey::G , kanzi::LogicalKey::H , kanzi::LogicalKey::I , kanzi::LogicalKey::J ,
  kanzi::LogicalKey::K , kanzi::LogicalKey::L , kanzi::LogicalKey::M , kanzi::LogicalKey::N ,
  kanzi::LogicalKey::O , kanzi::LogicalKey::P , kanzi::LogicalKey::Q , kanzi::LogicalKey::R ,
  kanzi::LogicalKey::S , kanzi::LogicalKey::T , kanzi::LogicalKey::U , kanzi::LogicalKey::V ,
  kanzi::LogicalKey::W , kanzi::LogicalKey::X , kanzi::LogicalKey::Y , kanzi::LogicalKey::Z ,
  kanzi::LogicalKey::Space , kanzi::LogicalKey::Backspace , kanzi::LogicalKey::Enter , kanzi::LogicalKey::Tab ,
  kanzi::LogicalKey::BackTab , kanzi::LogicalKey::Escape , kanzi::LogicalKey::CapsLock , kanzi::LogicalKey::NumLock ,
  kanzi::LogicalKey::PrintScreen , kanzi::LogicalKey::ScrollLock , kanzi::LogicalKey::Break , kanzi::LogicalKey::Insert ,
  kanzi::LogicalKey::Delete , kanzi::LogicalKey::Home , kanzi::LogicalKey::End , kanzi::LogicalKey::PageUp ,
  kanzi::LogicalKey::PageDown , kanzi::LogicalKey::Plus , kanzi::LogicalKey::Minus , kanzi::LogicalKey::Multiply ,
  kanzi::LogicalKey::Divide , kanzi::LogicalKey::ArrowUp , kanzi::LogicalKey::ArrowDown , kanzi::LogicalKey::ArrowLeft ,
  kanzi::LogicalKey::ArrowRight , kanzi::LogicalKey::Numpad0 , kanzi::LogicalKey::Numpad1 , kanzi::LogicalKey::Numpad2 ,
  kanzi::LogicalKey::Numpad3 , kanzi::LogicalKey::Numpad4 , kanzi::LogicalKey::Numpad5 , kanzi::LogicalKey::Numpad6 ,
  kanzi::LogicalKey::Numpad7 , kanzi::LogicalKey::Numpad8 , kanzi::LogicalKey::Numpad9 , kanzi::LogicalKey::NumpadDivide ,
  kanzi::LogicalKey::NumpadMultiply , kanzi::LogicalKey::NumpadPlus , kanzi::LogicalKey::NumpadMinus , kanzi::LogicalKey::NumpadComma ,
  kanzi::LogicalKey::NumpadEnter , kanzi::LogicalKey::F1 , kanzi::LogicalKey::F2 , kanzi::LogicalKey::F3 ,
  kanzi::LogicalKey::F4 , kanzi::LogicalKey::F5 , kanzi::LogicalKey::F6 , kanzi::LogicalKey::F7 ,
  kanzi::LogicalKey::F8 , kanzi::LogicalKey::F9 , kanzi::LogicalKey::F10 , kanzi::LogicalKey::F11 ,
  kanzi::LogicalKey::F12 , kanzi::LogicalKey::VolumeUp , kanzi::LogicalKey::VolumeDown , kanzi::LogicalKey::Softkey1 ,
  kanzi::LogicalKey::Softkey2 , kanzi::LogicalKey::Softkey3 , kanzi::LogicalKey::Softkey4 , kanzi::LogicalKey::Shift ,
  kanzi::LogicalKey::Control , kanzi::LogicalKey::Alt , kanzi::LogicalKey::Super , kanzi::LogicalKey::Menu ,
  kanzi::LogicalKey::LeftAlt , kanzi::LogicalKey::LeftControl , kanzi::LogicalKey::LeftShift , kanzi::LogicalKey::LeftSuper ,
  kanzi::LogicalKey::RightAlt , kanzi::LogicalKey::RightControl , kanzi::LogicalKey::RightShift , kanzi::LogicalKey::RightSuper ,
  kanzi::LogicalKey::ButtonA , kanzi::LogicalKey::ButtonB , kanzi::LogicalKey::ButtonC , kanzi::LogicalKey::ButtonX ,
  kanzi::LogicalKey::ButtonY , kanzi::LogicalKey::ButtonZ , kanzi::LogicalKey::ButtonL1 , kanzi::LogicalKey::ButtonL2 ,
  kanzi::LogicalKey::ButtonR1 , kanzi::LogicalKey::ButtonR2 , kanzi::LogicalKey::ButtonSelect , kanzi::LogicalKey::ButtonStart ,
  kanzi::LogicalKey::ButtonThumbL , kanzi::LogicalKey::ButtonThumbR , kanzi::LogicalKey::ButtonMode , kanzi::LogicalKey::Max
}
 Platform independent key enumeration. More...
 
enum class  kanzi::PointerButton : size_t {
  kanzi::PointerButton::Undefined , kanzi::PointerButton::Left , kanzi::PointerButton::Right , kanzi::PointerButton::Mid ,
  kanzi::PointerButton::Extended1 , kanzi::PointerButton::Extended2
}
 Pointer device button identifiers. More...
 
enum class  kanzi::PointerState {
  kanzi::PointerState::Pressed , kanzi::PointerState::Moved , kanzi::PointerState::Dragged , kanzi::PointerState::Released ,
  kanzi::PointerState::Scrolled
}
 Indicates the states of a pointing device. More...
 
enum class  kanzi::TouchPointState {
  kanzi::TouchPointState::Undefined , kanzi::TouchPointState::Pressed , kanzi::TouchPointState::Stationary , kanzi::TouchPointState::Moved ,
  kanzi::TouchPointState::Released
}
 Indicates the states of a touch point. More...
 
enum class  kanzi::TouchState { kanzi::TouchState::Begin , kanzi::TouchState::Update , kanzi::TouchState::End }
 Indicates the states of touch events. More...
 

Functions

FocusScopekanzi::findAncestorScopeForNode (const Node &node)
 Returns the ancestor focus scope of the node that you pass as an argument.
 
template<typename Predicate >
FocusScopekanzi::findAncestorScopeIf (Node &first, Node &last, Predicate predicate)
 Find the first ancestor scope in the [first node, last node) range, for which the predicate returns true.
 
template<typename Predicate >
FocusScopekanzi::findAncestorScopeIfNot (Node &first, Node &last, Predicate predicate)
 Find the first ancestor scope in the [first node, last node) range, for which the predicate returns false.
 
FocusFencekanzi::findFenceForNode (const Node &node)
 Returns the focus fence of the given node that you pass as an argument.
 
template<typename Function >
OverlayScopekanzi::findInputPropagationOverlayIf (OverlayScope *overlayScope, Function predicate)
 Finds the overlay focus scope that is the overlayScope, or one of its preceding overlay focus scopes to which Kanzi lets the input propagate, for which the predicate function returns true.
 
OverlayScopekanzi::findOverlayScopeForNode (const Node &node)
 Returns the overlay focus scope to which the node that you pass in this function belongs.
 
FocusScopekanzi::findScopeForNode (const Node &node)
 Returns the focus scope of the node that you pass as an argument.
 
template<typename Function >
void kanzi::forEachAncestorNodeInScope (const Node &node, const FocusScope *scope, Function function)
 Execute a function for every ancestor node of the node, until and including the focus scope node that is an ancestor of the node.
 
template<typename Function >
void kanzi::forEachAncestorScope (Node &first, Node &last, Function function)
 Execute a function for every focus scope in the [first node, last node) range.
 
template<typename Function >
void kanzi::forEachAncestorScopeOf (Node &node, Function function)
 Executes a function for every ancestor focus scope of the node, until and including the overlay focus scope node that owns the node.
 
Nodekanzi::getScopeFocusedNode (Node &node)
 Returns the last-focused node of the scope node.
 
template<typename TWrappedType >
shared_ptr< TWrappedTypekanzi::getWrappedEventSource (EventSourceSharedPtr eventSource)
 Returns the event source wrapper of TWrappedType type from the passed event source.
 
bool kanzi::isNodeInFocusableOverlay (const Node &node)
 Returns whether the given node is in one of the overlay scopes that are on top of the foremost modal scope, or in that modal scope itself.
 
bool kanzi::isOverlayFocusable (const OverlayScope &overlay)
 Returns whether the given overlay is focusable.
 
bool kanzi::isOverlayScope (const FocusScope *scope)
 Returns whether the focus scope passed as argument is an overlay focus scope.
 
 kanzi::KZ_ENABLE_BITMASK_OPERATORS (KeyModifier)
 
 kanzi::KZ_ENABLE_BITMASK_OPERATORS (PointerButton)
 
bool kanzi::operator!= (const FocusChainIndex &lhs, const FocusChainIndex &rhs)
 Inequality operator overload for focus chain index.
 
bool kanzi::operator< (const FocusChainIndex &lhs, const FocusChainIndex &rhs)
 Less operator overload for focus chain index.
 
bool kanzi::operator<= (const FocusChainIndex &lhs, const FocusChainIndex &rhs)
 Less or equal operator overload for focus chain index.
 
bool kanzi::operator== (const FocusChainIndex &lhs, const FocusChainIndex &rhs)
 Equality operator overload for focus chain index.
 
bool kanzi::operator> (const FocusChainIndex &lhs, const FocusChainIndex &rhs)
 Greater operator overload for focus chain index.
 
bool kanzi::operator>= (const FocusChainIndex &lhs, const FocusChainIndex &rhs)
 Greater or equal operator overload for focus chain index.
 
void kanzi::setScopeFocusedNode (Node &scope, Node &node)
 Sets the focus node for the given scope node.
 
FocusChainNode kanzi::unwrapFocusChainNode (FocusScope::FocusChain::FocusedTuple wrapped)
 Unwraps the focus chain node representation of the focused node of a focus scope from a wrapped node.
 

Detailed Description

Input and focus handling

Typedef Documentation

◆ PopupScope

Implements the popup scopes.

Since
Kanzi 3.7.0
Deprecated
In Kanzi 3.9.2

Enumeration Type Documentation

◆ InputTranslation

Enumeration to select translation of events.

Enumerator
TranslateNone 

Do not translate anything, receive both touch and pointer events.

TranslatePointerToTouch 

Translate all pointer events to touch events. Disable pointer events.

TranslateTouchToPointer 

Translate all touch events to pointer events. Disable touch events.

TranslatePointerToTouchPreserve 

Translate all pointer events to touch events. Preserve pointer events.

TranslateTouchToPointerPreserve 

Translate all touch events to pointer events. Preserve pointer events.

◆ KeyModifier

enum class kanzi::KeyModifier : size_t
strong

Key modifier flags. You can set more than one modifier at a time for a KeyEvent.

Enumerator
Undefined 

No key modifier is set, or the modifier is undefined.

CapsLock 

Specifies the Caps lock key modifier.

LeftShift 

Specifies the left Shift key modifier.

RightShift 

Specifies the right Shift key modifier.

LeftControl 

Specifies the left Control key modifier.

RightControl 

Specifies the right Control key modifier.

LeftAlt 

Specifies the left Alt key modifier.

RightAlt 

Specifies the right Alt key modifier.

LeftSuper 

Specifies the left Super key modifier.

See also
LogicalKey::Super
RightSuper 

Specifies the right Super key modifier.

See also
LogicalKey::Super
Shift 

Specifies the Shift modifier, used when the operating system does not separate the left and right Shift modifiers.

Control 

Specifies the Control modifier, used when the operating system does not separate the left and right Control modifiers.

Alt 

Specifies the Alt modifier, used when the operating system does not separate the left and right Alt modifiers.

Super 

Specifies the Super modifier, used when the operating system does not separate the left and right Super modifiers.

See also
LogicalKey::Super

◆ LogicalKey

Platform independent key enumeration.

Enumerator
Unknown 

Unknown keys are used for unmapped keys.

Number0 

Identifies the 0 key.

Number1 

Identifies the 1 key.

Number2 

Identifies the 2 key.

Number3 

Identifies the 3 key.

Number4 

Identifies the 4 key.

Number5 

Identifies the 5 key.

Number6 

Identifies the 6 key.

Number7 

Identifies the 7 key.

Number8 

Identifies the 8 key.

Number9 

Identifies the 9 key.

Comma 

Identifies the comma key.

Period 

Identifies the period key.

Semicolon 

Identifies the semicolon key.

Pipe 

Identifies the pipe key.

Quote 

Identifies the quote key.

DecimalSeparator 

Allows for the key mapping of a locale specific decimal separator.

ThousandsSeparator 

Allows for the key mapping of a locale specific thousands separator.

Identifies the A key.

Identifies the B key.

Identifies the C key.

Identifies the D key.

Identifies the E key.

Identifies the F key.

Identifies the G key.

Identifies the H key.

Identifies the I key.

Identifies the J key.

Identifies the K key.

Identifies the L key.

Identifies the M key.

Identifies the N key.

Identifies the O key.

Identifies the P key.

Identifies the Q key.

Identifies the R key.

Identifies the S key.

Identifies the T key.

Identifies the U key.

Identifies the V key.

Identifies the W key.

Identifies the X key.

Identifies the Y key.

Identifies the Z key.

Space 

Identifies the white-space key.

Backspace 

Identifies the backspace key.

Enter 

Identifies the Enter key.

Tab 

Identifies the Tab key.

BackTab 

Identifies the Back Tab key.

Escape 

Identifies the Escape key.

CapsLock 

Identifies the CapsLock key.

NumLock 

Identifies the NumLock key.

PrintScreen 

Identifies the PrintScreen key.

ScrollLock 

Identifies the ScrollLock key.

Break 

Identifies the Break key.

Insert 

Identifies the Insert key.

Delete 

Identifies the Delete key.

Home 

Identifies the Home key.

End 

Identifies the End key.

PageUp 

Identifies the PageUp key.

PageDown 

Identifies the PageDown key.

Plus 

Identifies the plus key.

Minus 

Identifies the minus key.

Multiply 

Identifies the asterisk key.

Divide 

Identifies the slash key.

ArrowUp 

Identifies the arrow up key.

ArrowDown 

Identifies the arrow down key.

ArrowLeft 

Identifies the arrow left key.

ArrowRight 

Identifies the arrow right key.

Numpad0 

Identifies the 0 key from the numeric keypad.

Numpad1 

Identifies the 1 key from the numeric keypad.

Numpad2 

Identifies the 2 key from the numeric keypad.

Numpad3 

Identifies the 3 key from the numeric keypad.

Numpad4 

Identifies the 4 key from the numeric keypad.

Numpad5 

Identifies the 5 key from the numeric keypad.

Numpad6 

Identifies the 6 key from the numeric keypad.

Numpad7 

Identifies the 7 key from the numeric keypad.

Numpad8 

Identifies the 8 key from the numeric keypad.

Numpad9 

Identifies the 9 key from the numeric keypad.

NumpadDivide 

Identifies the slash key from the numeric keypad.

NumpadMultiply 

Identifies the asterisk key from the numeric keypad.

NumpadPlus 

Identifies the plus key from the numeric keypad.

NumpadMinus 

Identifies the minus key from the numeric keypad.

NumpadComma 

Identifies the comma key from the numeric keypad.

NumpadEnter 

Identifies the Enter key from the numeric keypad.

F1 

Identifies the F1 function key.

F2 

Identifies the F2 function key.

F3 

Identifies the F3 function key.

F4 

Identifies the F4 function key.

F5 

Identifies the F5 function key.

F6 

Identifies the F6 function key.

F7 

Identifies the F7 function key.

F8 

Identifies the F8 function key.

F9 

Identifies the F9 function key.

F10 

Identifies the F10 function key.

F11 

Identifies the F11 function key.

F12 

Identifies the F12 function key.

VolumeUp 

Identifies the volume up key.

VolumeDown 

Identifies the volume down key.

Softkey1 

Identifies the first softkey button, typically present on a phone layout.

Softkey2 

Identifies the second softkey button, typically present on a phone layout.

Softkey3 

Identifies the third softkey button, typically present on a phone layout.

Softkey4 

Identifies the fourth softkey button, typically present on a phone layout.

Shift 

Identifies the Shift modifier key.

Control 

Identifies the Control modifier key.

Alt 

Identifies the Alt modifier key.

Super 

Identifies the Super key. You can map Windows key on Windows OS, or Command key on Mac OS to it.

Menu 

Identifies the menu key on keyboards where the key is available.

The key is also known as "hamburger button" on Android key layouts.

LeftAlt 

Identifies the left Alt modifier key.

LeftControl 

Identifies the left Control modifier key.

LeftShift 

Identifies the left Shift modifier key.

LeftSuper 

Identifies the left Super key.

RightAlt 

Identifies the right Alt modifier key.

RightControl 

Identifies the right Control modifier key.

RightShift 

Identifies the right Shift modifier key.

RightSuper 

Identifies the right Super key.

ButtonA 

Identifies the A button on game controllers.

ButtonB 

Identifies the B button on game controllers.

ButtonC 

Identifies the C button on game controllers.

ButtonX 

Identifies the X button on game controllers.

ButtonY 

Identifies the Y button on game controllers.

ButtonZ 

Identifies the Z button on game controllers.

ButtonL1 

Identifies the L1 button on game controllers.

ButtonL2 

Identifies the L2 button on game controllers.

ButtonR1 

Identifies the R1 button on game controllers.

ButtonR2 

Identifies the R2 button on game controllers.

ButtonSelect 

Identifies the select button on game controllers.

ButtonStart 

Identifies the start button on game controllers.

ButtonThumbL 

Identifies the ThumbL button on game controllers.

ButtonThumbR 

Identifies the ThumbR button on game controllers.

ButtonMode 

Identifies the mode button on game controllers.

Max 

Specifies the number of logical key values.

When extended, the enum value must be kept as last element of the enumeration.

◆ KeyState

Indicates the states of a hardware key.

Enumerator
Pressed 

The key is pressed.

Released 

The key is released.

◆ PointerButton

enum class kanzi::PointerButton : size_t
strong

Pointer device button identifiers.

Enumerator
Undefined 

The pointer button is undefined.

Left 

Identifies the left mouse button.

Right 

Identifies the right mouse button.

Mid 

Identifies the middle mouse button.

Extended1 

Identifies mouse Button 4.

Extended2 

Identifies mouse Button 5.

◆ PointerState

Indicates the states of a pointing device.

Enumerator
Pressed 

The pointer is pressed.

Moved 

The pointer moved.

Not all platforms support this state. For example, many touch screens do not support this state.

Dragged 

The pointer dragged.

Released 

The pointer is released.

Scrolled 

The pointer scrolled.

For example, you can use this for tracking the scrolling of the mouse wheel. Not all platforms support this state.

◆ TouchState

Indicates the states of touch events.

Enumerator
Begin 

The first finger is down.

Update 

A gesture or a touch event is in progress.

End 

The last finger is up.

◆ TouchPointState

Indicates the states of a touch point.

Enumerator
Undefined 

The touch point state is undefined.

Pressed 

The touch point was created by touching the screen.

Stationary 

The touch point did not move since the last report.

Moved 

The touch point moved since the last report.

Released 

The touch point was released.

Function Documentation

◆ getWrappedEventSource()

template<typename TWrappedType >
shared_ptr< TWrappedType > kanzi::getWrappedEventSource ( EventSourceSharedPtr eventSource)

Returns the event source wrapper of TWrappedType type from the passed event source.

If the event source is not a valid TWrappedType, but it is wrapped in an EventSourceDecorator, the function continues to cross-cast the event source returned by the EventSourceDecorator::getEventSource(), until it finds a valid event source.

Template Parameters
TWrappedTypeThe wrapped event source type.
Parameters
eventSourceThe event source to cross-cast.
Returns
If an event source that casts to TWrappedType is found, returns that event source. If no event source that casts to TWrappedType is found, returns nullptr.
Since
Kanzi 3.9.0

◆ operator>()

Greater operator overload for focus chain index.

◆ operator<()

Less operator overload for focus chain index.

◆ operator>=()

Greater or equal operator overload for focus chain index.

◆ operator<=()

Less or equal operator overload for focus chain index.

◆ operator==()

Equality operator overload for focus chain index.

◆ operator!=()

Inequality operator overload for focus chain index.

◆ unwrapFocusChainNode()

FocusChainNode kanzi::unwrapFocusChainNode ( FocusScope::FocusChain::FocusedTuple wrapped)

Unwraps the focus chain node representation of the focused node of a focus scope from a wrapped node.

Parameters
wrappedThe tuple with the focus chain and the iterator that points to the focus chain node compacted.
Returns
The focus chain node unwrapped, or an invalid focus chain node if the tuple is invalid.
Since
Kanzi 3.9.0

◆ findScopeForNode()

FocusScope * kanzi::findScopeForNode ( const Node & node)

Returns the focus scope of the node that you pass as an argument.

If that node is the focus scope node, returns the focus scope of the node itself.

Parameters
nodeThe node whose focus scope you want to get.
Returns
The focus scope of the requested node. If the node is not in a focus scope, returns nullptr.
Since
Kanzi 3.7.0

◆ findAncestorScopeForNode()

FocusScope * kanzi::findAncestorScopeForNode ( const Node & node)

Returns the ancestor focus scope of the node that you pass as an argument.

Parameters
nodeThe node whose focus scope you want to get.
Returns
The focus scope of the requested node. If the node is not in a focus scope, returns nullptr.
Since
Kanzi 3.9.0

◆ findFenceForNode()

FocusFence * kanzi::findFenceForNode ( const Node & node)

Returns the focus fence of the given node that you pass as an argument.

Parameters
nodeThe node whose focus fence node you want to get.
Returns
The focus fence of the requested node. If the node is not in a focus fence, returns a nullptr.
See also
FocusScopeTypeProperty
Since
Kanzi 3.7.0

◆ findOverlayScopeForNode()

OverlayScope * kanzi::findOverlayScopeForNode ( const Node & node)

Returns the overlay focus scope to which the node that you pass in this function belongs.

Parameters
nodeThe node for which to find the overlay focus scope.
Returns
The overlay focus scope. If one of the ancestor nodes is not attached, returns an invalid scope.
Since
Kanzi 3.9.2

◆ isOverlayScope()

bool kanzi::isOverlayScope ( const FocusScope * scope)

Returns whether the focus scope passed as argument is an overlay focus scope.

Parameters
scopeThe focus scope to check.
Returns
If the scope is an overlay focus scope, true. otherwise false.
Since
Kanzi 3.9.2

◆ isNodeInFocusableOverlay()

bool kanzi::isNodeInFocusableOverlay ( const Node & node)

Returns whether the given node is in one of the overlay scopes that are on top of the foremost modal scope, or in that modal scope itself.

Since
Kanzi 3.9.2

◆ isOverlayFocusable()

bool kanzi::isOverlayFocusable ( const OverlayScope & overlay)

Returns whether the given overlay is focusable.

An overlay is focusable if it is the foremost modal overlay or a modeless overlay above the foremost modal overlay in the overlay stack.

Returns
If the given overlay is focusable, true, otherwise false.
Since
Kanzi 3.9.3

◆ forEachAncestorScope()

template<typename Function >
void kanzi::forEachAncestorScope ( Node & first,
Node & last,
Function function )

Execute a function for every focus scope in the [first node, last node) range.

Template Parameters
FunctionA function with a
string logArgumentToString(const JNIError &jniError)
Used by logging system to convert legacy exception type objects to string.
Definition jni_error.hpp:26
The FocusScope class holds the attributes of a focus scope:
Definition focus_scope.hpp:668
signature.
Parameters
firstThe node which defines the first focus scope of the range.
lastThe node which must be the ancestor node, but not the scope node of the last focus scope of the range.
functionThe function to execute on each focus scope in the range.
Since
Kanzi 3.9.0

◆ forEachAncestorScopeOf()

template<typename Function >
void kanzi::forEachAncestorScopeOf ( Node & node,
Function function )

Executes a function for every ancestor focus scope of the node, until and including the overlay focus scope node that owns the node.

Template Parameters
FunctionA function with a signature.
Parameters
nodeThe node for whose focus scope you want to start the function execution.
functionThe function to execute on each focus scope.
Since
Kanzi 3.9.0

◆ forEachAncestorNodeInScope()

template<typename Function >
void kanzi::forEachAncestorNodeInScope ( const Node & node,
const FocusScope * scope,
Function function )

Execute a function for every ancestor node of the node, until and including the focus scope node that is an ancestor of the node.

Template Parameters
FunctionA function with a
{void(Node&)}
Base class for Kanzi nodes.
Definition node.hpp:123
signature.
Parameters
nodeThe node on which you want to start the function execution.
scopeThe scope that is the ancestor of the node.
functionThe function to execute on each ancestor node until the scope node.
Since
Kanzi 3.9.1

◆ findAncestorScopeIf()

template<typename Predicate >
FocusScope * kanzi::findAncestorScopeIf ( Node & first,
Node & last,
Predicate predicate )

Find the first ancestor scope in the [first node, last node) range, for which the predicate returns true.

Template Parameters
PredicateA function with a signature.
Parameters
firstThe node which defines the first focus scope of the range.
lastThe node which must be the ancestor node, but not the scope node of the last focus scope of the range.
predicateThe function to execute on each focus scope.
Returns
The pointer to the focus scope for which the predicate returns true. If the predicate returns false, returns nullptr.
Since
Kanzi 3.9.0

◆ findAncestorScopeIfNot()

template<typename Predicate >
FocusScope * kanzi::findAncestorScopeIfNot ( Node & first,
Node & last,
Predicate predicate )

Find the first ancestor scope in the [first node, last node) range, for which the predicate returns false.

Template Parameters
PredicateA function with a signature.
Parameters
firstThe node which defines the first focus scope of the range.
lastThe node which must be the ancestor node, but not the scope node of the last focus scope of the range.
predicateThe function to execute on each focus scope.
Returns
The pointer to the focus scope for which the predicate returns false. If the predicate returns true, returns nullptr.
Since
Kanzi 3.9.0

◆ findInputPropagationOverlayIf()

template<typename Function >
OverlayScope * kanzi::findInputPropagationOverlayIf ( OverlayScope * overlayScope,
Function predicate )

Finds the overlay focus scope that is the overlayScope, or one of its preceding overlay focus scopes to which Kanzi lets the input propagate, for which the predicate function returns true.

Template Parameters
FunctionA function with a
Implements the base of overlay focus scopes.
Definition focus_scope.hpp:1125
signature.
Parameters
overlayScopeThe overlay focus scope on which you want to start the function execution.
predicateThe function to execute on each overlay focus scope.
Returns
The pointer to the overlay focus scope for which the predicate returns true. If the predicate returns false for all preceding overlay focus scopes, returns nullptr.
Since
Kanzi 3.9.2

◆ getScopeFocusedNode()

Node * kanzi::getScopeFocusedNode ( Node & node)

Returns the last-focused node of the scope node.

Parameters
nodeThe scope node for which to return the last-focused node.
Returns
The last-focused node of the focus scope. If the node is not a focus scope or it does not have a last-focused node or otherwise focused node, returns nullptr.
Since
Kanzi 3.9.0 The purpose of the function changed.

◆ setScopeFocusedNode()

void kanzi::setScopeFocusedNode ( Node & scope,
Node & node )

Sets the focus node for the given scope node.

Clears the last-focused node of the scope, and sets the last-focused node of the scope to the node.

Parameters
scopeThe scope to which the focus node is set.
nodeThe node which becomes the focus node of the scope.
Since
Kanzi 3.9.0 The purpose of the function changed.

◆ KZ_ENABLE_BITMASK_OPERATORS() [1/2]

kanzi::KZ_ENABLE_BITMASK_OPERATORS ( KeyModifier )

◆ KZ_ENABLE_BITMASK_OPERATORS() [2/2]

kanzi::KZ_ENABLE_BITMASK_OPERATORS ( PointerButton )